package com.tetraq.grader;


import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.ArrayAdapter;

public class Grader extends ListActivity {
	
    
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Resources res = getResources();
        setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, res.getStringArray(R.array.menuArray)));
    }
    	@Override
    	protected void onListItemClick(ListView l, View v, int position, long id) {
    		Intent intent;
    		switch(position) {
    			default:
    			case 0: 
    				intent = new Intent(this, Points.class);
    				startActivity(intent);
    				break;
    			case 1: 
    				intent = new Intent(this, Percentage.class);
    				startActivity(intent);
    				break;
    		}
    	}

}